home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / gauge / odomvb25 / unit1.pas < prev    next >
Pascal/Delphi Source File  |  1995-12-16  |  1KB  |  50 lines

  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, VBXCtrl, Odomet25, ExtCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Odometer1: TOdometer;
  12.     Odometer2: TOdometer;
  13.     Odometer3: TOdometer;
  14.     ScrollBar1: TScrollBar;
  15.     Timer1: TTimer;
  16.     procedure ScrollBar1Change(Sender: TObject);
  17.     procedure Timer1Timer(Sender: TObject);
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.   end;
  23.  
  24. var
  25.   Form1: TForm1;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure TForm1.ScrollBar1Change(Sender: TObject);
  32. begin
  33.  
  34.      Odometer1.Value := ScrollBar1.Position;
  35.      Odometer2.Value := ScrollBar1.Position;
  36.      Odometer3.Value := ScrollBar1.Position;
  37.  
  38. end;
  39.  
  40. procedure TForm1.Timer1Timer(Sender: TObject);
  41. begin
  42.  
  43.      Odometer1.Value := Odometer1.Value + 0.002;
  44.      Odometer2.Value := Odometer2.Value + 0.002;
  45.      Odometer3.Value := Odometer3.Value + 0.002;
  46.  
  47. end;
  48.  
  49. end.
  50.